city_details_by_url($city_url); $city_id = $city_dtls['city_id']; if($city_id > 0){ $country_id = $city_dtls['country_id']; //=================================================================================== $qryCountryInc = "SELECT * FROM `yp_countries` WHERE `id` = '$country_id'"; $resCountryInc = mysqli_query($condb,$qryCountryInc) or die('Error, query failed1 ' . mysqli_error($condb)); $rCountryInc = mysqli_fetch_array($resCountryInc); $countrySessionId = $rCountryInc['id']; $currency = $rCountryInc['currency']; $countrySession = $rCountryInc['alpha_2']; $lang = $rCountryInc['lang']; $expire = (time()+60*60*24*90); setcookie("cntry", $countrySession, $expire, "/", "zumvu.com"); //=================================================================================== } $logged_user = $_COOKIE['zv_log_user']; $qry_counta = mysqli_query($condb,"SELECT `member_id` FROM `zv_members` WHERE `member_username` = '$logged_user'"); $ru = mysqli_fetch_array($qry_counta); $member_id = $ru['member_id']; $qry_countm = mysqli_query($condb,"SELECT * FROM `zv_members` WHERE `member_id` = '$member_id'"); $usrDetails = mysqli_fetch_object($qry_countm); $user_mail = $usrDetails->member_email; //============================================================================================================ function decrypt($string, $key) { $result = ''; $string = base64_decode($string); for($i=0; $isetTimezone($timezone); $dt = $date->format( 'd M Y H:i' ); $time_now = strtotime("$dt"); $title_url = $_GET['tu']; $ad_id = $_GET['aid']; $najx_id = $ad_id; $city_url = $_GET['city']; $own_url = "/$city_url/v$ad_id/$title_url/"; $ad_details = $sanformation->ad_details($ad_id); $check_url = "/".$ad_details['city_url']."/v$ad_id/".$ad_details['title_url']."/"; //============================= check for 404 start ====== if($ad_details['title_url'] != ''){ //echo "$check_url -- $own_url"; if($check_url != $own_url) { //header('HTTP/1.1 404 Not Found'); //header("Location: 404.html"); //include '404_include.html'; header("HTTP/1.1 301 Moved Permanently"); header("Location: /$city_url"); }else{ //header("Location: $check_url"); } $activated_on = $ad_details['activated_on']; $activated_on = date("F j, Y, g:i a", $activated_on); $adids = $ad_id; $views = $ad_details['views']; $title = $ad_details['title']; $title = removetags($title); $title_comma = trim($title,'"'); $description_raw = $ad_details['description']; //$description = removetags($description); //$description_meta = substr($description, 0, 100); $more_description = $ad_details['more_description']; $more_description = html_entity_decode($more_description, ENT_QUOTES, "UTF-8"); $meta_title = $ad_details['meta_title']; function nofollow($html, $skip = null) { return preg_replace_callback( "#(]+?)>#is", function ($mach) use ($skip) { return ( !($skip && strpos($mach[1], $skip) !== false) && strpos($mach[1], 'rel=') === false ) ? $mach[1] . ' rel="nofollow">' : $mach[0]; }, $html ); } /* echo nofollow('something'); // will be same because it's already contains rel parameter echo nofollow('something'); // ad // add rel="nofollow" parameter to anchor echo nofollow('something', 'localhost'); // skip this link as internall link */ $description = html_entity_decode($description_raw, ENT_QUOTES, "UTF-8"); $description_meta = strip_tags($description, ' '); $description_meta = substr($description_meta, 0, 100); $ad_owner_email = $ad_details['ad_owner_email']; $owner_contact_no = $ad_details['owner_contact_no']; $status = $ad_details['status']; if($master_admin == ''){ if($status == 0){ if($user_mail == $ad_owner_email){}else{ header("HTTP/1.1 301 Moved Permanently"); header("Location: https://zumvu.com/marketplace/"); exit(); } }} //echo "SELECT * FROM `zv_members` WHERE `member_email` = '$ad_owner_email'"; //======================================================================== $qry_owner = mysqli_query($condb,"SELECT * FROM `zv_members` WHERE `member_email` = '$ad_owner_email'"); $ownerDetails = mysqli_fetch_object($qry_owner); $owner_emailCheck = $ownerDetails->member_email; $owner_about_me = $ownerDetails->member_about_me; $owner_name = $ownerDetails->member_name; $owner_profile = $ownerDetails->member_profile; $owner_picture = $ownerDetails->member_picture; $owner_memId = $ownerDetails->member_id; $profile_verified = $ownerDetails->profile_verified; if($owner_picture == "noimage.jpg"){ $owner_picture = "https://c.cdnxp.com/gtheme/images/profileimage.png"; } if($profile_verified == '1'){ $vrfy = ''; } elseif($profile_verified == '2'){ $vrfy = ''; }else{ $vrfy = ''; } //======================================================================== $city_name = $ad_details['city_name']; $locations = $ad_details['locations']; $category_name = $ad_details['category_name']; $category_url = $ad_details['category_url']; $category_id = $ad_details['category_id']; $category_parents = $ad_details['category_parents']; $ind_row = $sanformation->category_details($category_parents); $ind_name = $ind_row['category_name']; $ind_url = $ind_row['category_url']; $photo = $ad_details['photo']; $image_array = explode(",",$photo); $video = $ad_details['video']; $brand = $ad_details['brand']; $calltoaction = $ad_details['calltoaction']; $calltoaction_link = $ad_details['calltoaction_link']; $ogtags = $ad_details['ogtags']; $ogtags = str_replace(",",", ",$ogtags); $more_description = $ad_details['more_description']; $more_description = html_entity_decode($more_description, ENT_QUOTES, "UTF-8"); $photoog = $ad_details['photo']; $image_arrayog = explode(",",$photoog); if(is_array($image_arrayog)){ $imageOg = $image_arrayog[0]; }else{ $imageOg = $photoog; } /* if($imageOg != ''){ if(!@file_get_contents($imageOg)){ $imageOg = ''; } } */ $owner_contact_no = $ad_details['owner_contact_no']; $ad_owner_email = $ad_details['ad_owner_email']; $show_mail = $ad_details['show_mail']; $show_no = $ad_details['show_no']; if($show_mail == '1'){ $show_mail_val = '
  • Poster Email : '.$ad_owner_email.'
  • '; } if($show_no == '1'){ $show_no_val = '
  • Poster Contact No : '.$owner_contact_no.'
  • '; } $status = $ad_details['status']; $owner_email_encode = base64_encode($ad_owner_email); $home_url = "/marketplace/$city_url/"; $category_url = "/marketplace/$city_url/$category_url/c$category_id"."a0p1/"; $ind_url = "/marketplace/$city_url/$ind_url/s$category_parents"."a0p1/"; //============================================ duration calculator ================================ $dt = $date->format( 'd M Y H:i' ); $time_now = strtotime("$dt"); function Duration($s, $e){ $timestamp = $e - $s; $years=floor($timestamp/(60*60*24*365)); $timestamp%=60*60*24*365; $weeks=floor($timestamp/(60*60*24*7)); $timestamp%=60*60*24*7; $days=floor($timestamp/(60*60*24)); $timestamp%=60*60*24; $hrs=floor($timestamp/(60*60)); $timestamp%=60*60; $mins=floor($timestamp/60); $secs=$timestamp%60; if ($years >= 1) { $str.= $years.' years '; } else if ($weeks >= 1) { $str.= $weeks.' weeks '; } else if ($days >= 1) { $str.=$days.' days '; } else if ($hrs >= 1) { $str.=$hrs.' hours '; } else if ($mins >= 1) { $str.=$mins.' minutes '; } else{ $str = '2'; } //--------------------------------------------------- /* if($days < 1){ if ($hrs >= 1) { $str.=$hrs.' hours '; } if ($mins >= 1) { $str.=$mins.' minutes '; } }else{ $str = '2'; }*/ return $str; } //================================================================================================================ if($user_mail != ''){ $sq = "SELECT `b_id` FROM `yp_bookmarked` WHERE `ad_id` = '$ad_id' AND `user_mail` = '$user_mail'"; $resb = mysqli_query($condb,$sq); $bc = mysqli_num_rows($resb); }else{ $bc = '2'; } if($ogtags == ''){ $keytags = "$title_comma, $category_name, $city_name"; }else{ $keytags = $ogtags; } //if($plan == '1'){ $description = nofollow($description); } $description = nofollow($description); $cannoUrl = "https://zumvu.com/marketplace".$check_url; $chkAdId = $ad_id; $churl = "https://zumvu.com/marketplace".$check_url."/"; $churl = base64_encode($churl); $ch = curl_init(); curl_setopt($ch, CURLOPT_URL,"https://zumvu.link/getsurl.php"); curl_setopt($ch, CURLOPT_POST, 1); curl_setopt($ch, CURLOPT_POSTFIELDS, "s=1e4d36177d71bbb3558e43af9577d70e&c=$chkAdId&l=$churl"); curl_setopt($ch, CURLOPT_RETURNTRANSFER, true); $server_output = curl_exec($ch); curl_close ($ch); $server_output = json_decode($server_output, true); $sortUrl = $server_output['l']; if($meta_title != ''){ $metaTitle = $meta_title; }else{ $metaTitle = "$title_comma - $category_name in $city_name"; } if($more_description != ''){ $metaDesceription = $more_description; }else{ $metaDesceription = "$description_meta, $title_comma in $city_name"; } ?> <?=$metaTitle;?>

    -
    st_cut($val); if($val != ''){ if($leb != 'Price'){ ?>
    : 
    1){ ?>
    '.$locations.''; } if($city_name != ''){ $memAddSchema .= ''.$city_name .''; } if($countrySession != ''){ $memAddSchema .= ''.$countrySession .''; } $memAddSchema = rtrim($memAddSchema, ','); ?>
    '0'){ $persent = round((($price-$sales_price)*100)/$price); }else{ $persent = ''; } if($price > '0'){ $pric_disp = '
    '.$currency.' '.number_format($price).'
    '; }else{ $pric = ''; } if($sales_price > '0'){ $pric_disp = '
    '.$currency.' '.number_format($sales_price).' '.number_format($price).'
    (save '.$persent.'%)
    '; }else{ } if($price == ''){ $price = 0; } ?>
    '.$calltoaction.''; }else if($calltoaction == 'Buy Now'){ echo ''.$calltoaction.''; }else if($calltoaction == 'Add to Cart'){ echo ''.$calltoaction.''; }else if($calltoaction == 'Shop Now'){ echo ''.$calltoaction.''; }else if($calltoaction == 'Book Now'){ echo ''.$calltoaction.''; //====================================================== }else if($calltoaction == 'Visit Site'){ echo ''.$calltoaction.''; }else if($calltoaction == 'Visit Store'){ echo ''.$calltoaction.''; }else if($calltoaction == 'Visit Blog'){ echo ''.$calltoaction.''; }else if($calltoaction == 'Shop Now'){ echo ''.$calltoaction.''; //====================================================== }else if($calltoaction == 'Call now'){ echo ''.$calltoaction.''; }else if($calltoaction == 'Email'){ echo ''.$calltoaction.''; }else if($calltoaction == 'Whatsapp'){ echo 'WhatsAppWhatsApp'; //====================================================== }else{ echo ''.$calltoaction.''; } ?>

    Video

    st_cut($vals); if($val != ''){ $species .= ''.convertIntoLanguageReturn($leb,$lang).''.$val.''; } $leb = ''; $val = ''; } $brand = substr($brand, 0, -2); if($brand != ''){ $species .= ''.convertIntoLanguageReturn('Brand',$lang).''.$brand.''; } if($species != ''){ ?>

    Saved

    Recent ads in this category

    '; while($rows = mysqli_fetch_array($result)) { $plan = $rows['plan']; $ad_id = $rows['ad_id']; $title = $rows['title']; $title = remove_any_tags($title); $title_url = $rows['title_url']; $description = $rows['description']; $wordChunks = explode("
    ", $description); $description = ''; for($i = 0; $i < count($wordChunks); $i++){ $description .= "$wordChunks[$i] "; } $wordChunks = explode("
    ", $description); $description = ''; for($i = 0; $i < count($wordChunks); $i++){ $description .= "$wordChunks[$i] "; } $description = remove_any_tags($description); $description = substr($description, 0, 140); $ad_details = $sanformation->ad_details($ad_id); $views = $ad_details['views']; $listing_approve_date = $rows['activated_on']; $listing_approve_date_disp = date("F j, Y, g:i a", $listing_approve_date); $images = $rows['photo']; $image_array = explode(",",$images); $count_array = count($image_array); if($count_array == '1' AND $images == ''){ $cnt = '0'; }else{ $cnt = $count_array; } if($rows['photo'] == 'none'){ $img = "/images/noimage.gif"; $img_cd = ''; }elseif($rows['photo'] != ''){ if($count_array == '0'){ $img = $rows['photo']; }else{ $img = $image_array[0]; } $img_cd = ''; }else{ $img = "/marketplace/images/noimage.gif"; $img_cd = ''; } $duration = Duration($listing_approve_date, $time_now); if($duration != '2'){ $duro = $duration.' ago'; }else{ $duro = $listing_approve_date_disp; } $locations = $rows['locations']; $locations_array = explode(",",$locations); if($locations != ''){ $loc = ''.$locations_array[0].''; }else{ $loc = ''; } $you_are = $rows['you_are']; $yr = substr($you_are, 1, 50); $yr = substr($yr, 0, -2); if($yr != ''){ $you = ''.$yr.''; }else{ $you = ''; } //$price = $rows['price']; //if($price > '0'){ $pric = ''.$currency.' '.number_format($price).''; }else{ $pric = ''; } $price = $rows['price']; $sales_price = $rows['sales_price']; if($sales_price > '0'){ $persent = round((($price-$sales_price)*100)/$price); }else{ $persent = ''; } if($price > '0'){ $pric = ''.$currency.' '.number_format($price).''; }else{ $pric = ''; } if($sales_price > '0'){ $pric = ''.$currency.' '.number_format($sales_price).' '.number_format($price).'
    (save '.$persent.'%)
    '; $dealClass = '
    '; }else{ $dealClass = ''; } $add_url = "https://zumvu.com/marketplace/$city_url/v$ad_id/$title_url/"; $calltoaction = $rows['calltoaction']; $calltoaction_link = $rows['calltoaction_link']; //if($calltoaction == "Direct Link"){ $add_url = $calltoaction_link; $lrl = ' target="_blank"'; }else{ $lrl = ''; } if($calltoaction == "Direct Link"){ $add_url = $calltoaction_link; $lrl = ' target="_blank" class="dirclnk" data-name="'.$ad_id.'"'; } else if($calltoaction == "Visit Site"){ $add_url = $calltoaction_link; $lrl = ' target="_blank" class="dirclnk" data-name="'.$ad_id.'"'; } else if($calltoaction == "Visit Store"){ $add_url = $calltoaction_link; $lrl = ' target="_blank" class="dirclnk" data-name="'.$ad_id.'"'; } else if($calltoaction == "Visit Blog"){ $add_url = $calltoaction_link; $lrl = ' target="_blank" class="dirclnk" data-name="'.$ad_id.'"'; } else{ $lrl = ''; } if($plan == '1'){ $class = "whiteboxdetails"; }elseif($plan == '2'){ $class = 'yellowboxdetails'; } $btnLabel = $rows['calltoaction']; $btnValue = $rows['calltoaction_link']; $extVal = ''; $callToActionBtn = $sanformation->callToActionBtn($btnLabel,$btnValue,$extVal,$plan); if($btnLabel !=''){ $callToActionBtn_extend = $callToActionBtn; $exclass_name = 'desclassspan'; }else{ $callToActionBtn_extend =''; $exclass_name =''; } $display .= '
    '.$dealClass.'
    '.$title.'
    '.$views.' views | '.$duro.'
    '.$description.'...
    '.$callToActionBtn_extend.'
    '.$views.' views | '.$duro.'
    '.$pric.$you.$loc.'
    '.$callToActionBtn_extend.'
    '; } } echo $display; ?>
    <?=$owner_name;?> <?=$owner_name;?>

    '.$ad_owner_email.''; $c++; }else{ $show_mail_val = ''; }} if($show_no == '1'){ if($owner_contact_no != ''){ $show_no_val = '
  • '.$owner_contact_no.'
  • '; $c++; }else{ $show_no_val = ''; }} if($c > 0){ ?>

    0){ ?>
    ()

    Recent ads in this category

    '; while($rows = mysqli_fetch_array($result)) { $plan = $rows['plan']; $ad_id = $rows['ad_id']; $title = $rows['title']; $title = remove_any_tags($title); $title_url = $rows['title_url']; $description = $rows['description']; $wordChunks = explode("
    ", $description); $description = ''; for($i = 0; $i < count($wordChunks); $i++){ $description .= "$wordChunks[$i] "; } $wordChunks = explode("
    ", $description); $description = ''; for($i = 0; $i < count($wordChunks); $i++){ $description .= "$wordChunks[$i] "; } $description = remove_any_tags($description); $description = substr($description, 0, 140); $ad_details = $sanformation->ad_details($ad_id); $views = $ad_details['views']; $listing_approve_date = $rows['activated_on']; $listing_approve_date_disp = date("F j, Y, g:i a", $listing_approve_date); $images = $rows['photo']; $image_array = explode(",",$images); $count_array = count($image_array); if($count_array == '1' AND $images == ''){ $cnt = '0'; }else{ $cnt = $count_array; } if($rows['photo'] == 'none'){ $img = "/images/noimage.gif"; $img_cd = ''; }elseif($rows['photo'] != ''){ if($count_array == '0'){ $img = $rows['photo']; }else{ $img = $image_array[0]; } $img_cd = ''; }else{ $img = "/marketplace/images/noimage.gif"; $img_cd = ''; } $duration = Duration($listing_approve_date, $time_now); if($duration != '2'){ $duro = $duration.' ago'; }else{ $duro = $listing_approve_date_disp; } $locations = $rows['locations']; $locations_array = explode(",",$locations); if($locations != ''){ $loc = ''.$locations_array[0].''; }else{ $loc = ''; } $you_are = $rows['you_are']; $yr = substr($you_are, 1, 50); $yr = substr($yr, 0, -2); if($yr != ''){ $you = ''.$yr.''; }else{ $you = ''; } //$price = $rows['price']; //if($price > '0'){ $pric = ''.$currency.' '.number_format($price).''; }else{ $pric = ''; } $price = $rows['price']; $sales_price = $rows['sales_price']; if($sales_price > '0'){ $persent = round((($price-$sales_price)*100)/$price); }else{ $persent = ''; } if($price > '0'){ $pric = ''.$currency.' '.number_format($price).''; }else{ $pric = ''; } if($sales_price > '0'){ $pric = ''.$currency.' '.number_format($sales_price).' '.number_format($price).'
    (save '.$persent.'%)
    '; $dealClass = '
    '; }else{ $dealClass = ''; } $add_url = "https://zumvu.com/marketplace/$city_url/v$ad_id/$title_url/"; $calltoaction = $rows['calltoaction']; $calltoaction_link = $rows['calltoaction_link']; //if($calltoaction == "Direct Link"){ $add_url = $calltoaction_link; $lrl = ' target="_blank"'; }else{ $lrl = ''; } if($calltoaction == "Direct Link"){ $add_url = $calltoaction_link; $lrl = ' target="_blank" class="dirclnk" data-name="'.$ad_id.'"'; } else if($calltoaction == "Visit Site"){ $add_url = $calltoaction_link; $lrl = ' target="_blank" class="dirclnk" data-name="'.$ad_id.'"'; } else if($calltoaction == "Visit Store"){ $add_url = $calltoaction_link; $lrl = ' target="_blank" class="dirclnk" data-name="'.$ad_id.'"'; } else if($calltoaction == "Visit Blog"){ $add_url = $calltoaction_link; $lrl = ' target="_blank" class="dirclnk" data-name="'.$ad_id.'"'; } else{ $lrl = ''; } //if($plan == '1'){ $class = "whiteboxdetails"; }elseif($plan == '2'){ $class = 'yellowboxdetails'; } $class = $sanformation->plan_class($plan); $btnLabel = $rows['calltoaction']; $btnValue = $rows['calltoaction_link']; $extVal = ''; $callToActionBtn = $sanformation->callToActionBtn($btnLabel,$btnValue,$extVal,$plan); if($btnLabel !=''){ $callToActionBtn_extend = $callToActionBtn; $exclass_name = 'desclassspan'; }else{ $callToActionBtn_extend =''; $exclass_name =''; } $display .= '
    '.$dealClass.'
    '.$title.'
    '.$views.' views | '.$duro.'
    '.$description.'...
    '.$callToActionBtn_extend.'
    '.$views.' views | '.$duro.'
    '.$pric.$you.$loc.'
    '.$callToActionBtn_extend.'
    '; } } echo $display; ?>


    ssion = $ssion
    ".$_SESSION['pvs'.$ad_id]."
    $sql_update"; ?>